package cn.com.stums.action.ajax;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

import cn.com.stums.dao.ajax.searchInfoDao;
import cn.com.stums.model.common.AdminBean;
import cn.com.stums.util.StumsWebContent;

public class adminAjaxSearch {
	private String data;
	private String array;
	private List resultList;
	private Map resultMap;
	
	private searchInfoDao searchDao;
	
	public String queryAdmin(){
		if(data == null){
			return null;
		}
		resultMap = new HashMap();
		AdminBean bean = new AdminBean();
		bean.setStAdminEmployer(data);
		
		Map map = new HashMap();
		List result = searchDao.queryAdminInfo(bean);
		for(int i=0; i < result.size() ; i ++){
			bean = (AdminBean) result.get(i);
			map.put(bean.getStAdminCounter(), bean.getStAdminEmployer());
		}
		resultMap.put("result", map);
		return StumsWebContent.FORWARD_SUCCESS;
	}



	public String getData() {
		return data;
	}
	public void setData(String data) {
		this.data = data;
	}
	public String getArray() {
		return array;
	}
	public void setArray(String array) {
		this.array = array;
	}
	public List getResultList() {
		return resultList;
	}
	public void setResultList(List resultList) {
		this.resultList = resultList;
	}
	public Map getResultMap() {
		return resultMap;
	}
	public void setResultMap(Map resultMap) {
		this.resultMap = resultMap;
	}
	public searchInfoDao getSearchDao() {
		return searchDao;
	}
	public void setSearchDao(searchInfoDao searchDao) {
		this.searchDao = searchDao;
	}
}
